import requests


class Pusher():
    def __init__(self, title, desp):
        self.title = title
        self.desp = desp
        # 查找出车站的英文简称，用于构造cookie、完整的余票查询链接

    def pusher_wx_msg(self):
        url = 'https://sctapi.ftqq.com/SCT61499T8FL4kMbQ9u8HpqopS8VslHvb.send'
        headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36',
            'Content-type': 'application/json'
        }
        payload = {'text': self.title, 'desp': self.desp}
        requests.post(url, params=payload, verify=False)



if __name__ == '__main__':
    pusher = Pusher('yyp', 'healty')
    pusher.pusher_wx_msg()
